package com.huawei.bookborrowms.user.controller;

import com.huawei.base.BaseRes;
import com.huawei.bookborrowms.user.entity.UserEntity;
import com.huawei.bookborrowms.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 黄后林
 * @date 2022-11-11 11:36:13
 * @note 程序员是用代码喂出来的
 */

@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService service;

    //http://localhost:8083/user/login
    @PostMapping("login")
    public BaseRes login(UserEntity user){
        return service.login(user);
    }
}
